<load href="__PUBLIC__/Js/showdate.js"/>
<include file="./Admin/Tpl/Index/header.html"/>			

<include file="./Admin/Tpl/Index/left.html"/>	


<script>
				$(function(){
				
				//提交表单
				$('img.search').click(function(){
					$('form[name="searchExchangeForm"]').submit();
				});
				
				$('#exportData').click(function(){
					
					var username='';
					var userphone='';
					var realname='';
					var sncode='';
					var shopcode='';
					var shopname='';
					if($("#username").val()!=''){
						username =$("#username").val();
					}
					
					if($("#userphone").val()!=''){
						userphone =$("#userphone").val();
					}
					if($("#realname").val()!=''){
						realname =$("#realname").val();
					}
					if($("#sncode").val()!=''){
						sncode =$("#sncode").val();
					}
					if($("#shopcode").val()!=''){
						shopcode =$("#shopcode").val();
					}
					if($("#shopname").val()!=''){
						shopname =$("#shopname").val();
					}

					window.location.href = "__APP__/Shop/exportExchangeData/username/"+username+"/userphone/"+userphone+"/realname/"+realname+"/sncode/"+sncode+"/shopcode/"+shopcode+"/shopname/"+shopname;
				});
			});
		</script>		
	<div class="diywap_right">

		<div class="well well-sm">门店领奖明细</div>
					
					<form  name="searchExchangeForm" action="__APP__/Shop/searchExchange"  method="get" >
		<div>
		
			门店码:<input type='text' name='shopcode' id="shopcode" value="<{$_GET['shopcode']}>"/>
			门店名称: <input type='text' name='shopname' id="shopname" value="<{$_GET['shopname']}>"/>
			领奖码: <input type='text' name='sncode' id="sncode" value="<{$_GET['sncode']}>"/>
			<br/><br/>
			开始时间:<input type="text" id="startdate" name="startdate" onclick="return Calendar('startdate');" value="<{$_GET['startdate']}>" class="text" style="width:85px;"/>
			结束时间:<input type="text" id="enddate" onclick="return Calendar('enddate');" value="<{$_GET['enddate']}>" name="enddate" class="text" style="width:85px;"/>
			 		 
			<button type="submit" class="btn btn-primary btn-lg" id="search">查询</button>
			<if condition="$Think.session.role eq 'level_1_adminxxxx' ">
			<div class="btn btn-primary btn-lg" id="exportData" style="display: none;">导出数据</div>
			</if>
		</div>
		</form>
		</br>
		
		<table class="table table-hover table-bordered">
			<tr>
				<th>序号</th>
				<th>用户昵称</th>
				<th>用户头像</th>
				<th>总金额</th>
				<th>领奖码</th>
				<th>领奖门店</th>
				<th>领奖时间</th>
			</tr>
			<volist name='data' id='vo'>
				<tr class="active">
					<td><{$i}></td>
					<td><{$vo.username}></td>
					<td>
					    <if condition="$vo.headimgurl eq '' ">
					    	<img src="__PUBLIC__/Images/person.gif" style="width:45px;height: 45px;"/>
					    <else /><img src="<{$vo.headimgurl}>" style="width:45px;height: 45px;"/>
					    </if>
					</td>
					<td><{$vo.score}></td>
					<td><{$vo.sncode}></td>
					<td><{$vo.shopname}></td>
					<td><{$vo.exchangedatetime}></td>
				</tr>
			</volist>

		</table>
		
		</br>
		<div style="text-align:center;"><{$page}></div>

			</div>

		

</div>

</body>

</html>